import Emberbox from "@/utils/mapbox/engine";
import { baseurl } from "../../config";

export default function freedomsManage(emberbox: Emberbox) {
  let data: any = null,
    freedoms: any = null,
    isShow: boolean = true;
  fetch(`${baseurl}/freedoms`)
    .then((res) => res.json())
    .then((res: any) => {
      data = res;
      console.log("freedoms", res);

      freedoms = emberbox.geojsonManage?.addJson(res, false);
      isShow = true;
      console.log("freedoms", freedoms);
    })
    .catch((err) => {
      console.log("数据获取失败：freedoms");
    });
}
